'use strict';
/**
 * @bussiness {收藏}
 * @author {填写作者}
 * @date {创建时间}
 * **/
 const Service = require('egg').Service;
 class Collection extends Service { 
    /**
     * @effect 收藏
     * **/
    async collectionOnePost(params) {
        const {app} = this;
        const res = await app.mysql.insert("collectionposts", params);
        return res
    }
    /**@effect 拿到收藏**/
    async takeCollectionPosts(params) {
        const {app} = this;
        
        const res = await app.mysql.select("collectionposts", {where:{user_id:params.user_id}});
        return res
    }
 }
 module.exports = Collection;